package com.vision.admin.cl.resource;

import com.google.gwt.resources.client.ImageResource;
import com.sencha.gxt.data.shared.IconProvider;
import com.vision.admin.cl.AdminTasks;
import com.vision.core.cm.data.TaskNode;

/**
 * 
 * @author Mark
 *
 */
public class MenuIconProvider implements IconProvider<TaskNode> {

	private static AdminResources bundle = AdminResources.INSTANCE;
	
	@Override
	public ImageResource getIcon(TaskNode model) {
		if (AdminTasks.MASTERLIST.getId().equals(model.getId()))
			return bundle.masterlist();
		
		if (AdminTasks.COMPANIES.getId().equals(model.getId()))
			return bundle.companies();
		
		if (AdminTasks.USERS.getId().equals(model.getId()))
			return bundle.users();
		
		if (AdminTasks.ROLES.getId().equals(model.getId()))
			return bundle.roles();
		
		if (AdminTasks.PROFILE.getId().equals(model.getId()))
			return bundle.profile();
		
		if (AdminTasks.MAINTENANCE.getId().equals(model.getId()))
			return bundle.maintenance();
		
		if (AdminTasks.ACTIVITY_LOG.getId().equals(model.getId()))
			return bundle.activity_log();
		
		return null;
	}

}
